package com.gitee.wsl.time

import kotlinx.datetime.LocalDateTime
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.hours
import kotlin.time.Duration.Companion.minutes

enum class ReminderDateTimeModel {
    AFTER_30_MINUTES,
    AFTER_1_HOUR,
    TOMORROW_MORNING_7,
    CUSTOM,
}

fun ReminderDateTimeModel.formatToLocalDateTime(): LocalDateTime {
    return when (this) {
        ReminderDateTimeModel.AFTER_30_MINUTES -> LocalDateTime.now() + 30.minutes
        ReminderDateTimeModel.AFTER_1_HOUR -> LocalDateTime.now() + 1.hours
        ReminderDateTimeModel.TOMORROW_MORNING_7 -> LocalDateTime.now().date + 1.days + 7.hours
        ReminderDateTimeModel.CUSTOM -> LocalDateTime.now()
    }
}